#include <iostream>
#include "TransCodes.h"
using namespace std;
MySocket so;
typedef unsigned int uint;
int main(int argc, char** argv) {
    int ssock = so.openListenfd(8888);
    sockaddr_in addr;
    socklen_t len = sizeof(addr);
    while (1) {
        int socket = accept(ssock, (sockaddr*)&addr, &len);
        TransCode trans(socket);
        string s;
        int flag;
        while (1) {
            s = trans.getLine(flag);
            if (!flag) break;
            cout<<s<<endl;
        }
    }
    return 0;
}
